home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_3.5 / Documentation / Autodocs / clicktab_gc.doc < prev    next >
Encoding:
Text File  |  1999-10-29  |  8.9 KB  |  268 lines

  1. TABLE OF CONTENTS
  2.  
  3. clicktab_gc/--datasheet--
  4. clicktab_gc/CLICKTAB_GetClass
  5. clicktab_gc/AllocClickTabNodeA
  6. clicktab_gc/FreeClickTabNode
  7. clicktab_gc/GetClickTabNodeAttrsA
  8. clicktab_gc/SetClickTabNodeAttrsA
  9. clicktab_gc/--datasheet--                           clicktab_gc/--datasheet--
  10.  
  11.     NAME
  12.         clicktab.gadget--File folder tabs gadget.
  13.  
  14.     SUPERCLASS
  15.         gadgetclass
  16.  
  17.     REQUIRES
  18.         None.
  19.  
  20.     DESCRIPTION
  21.         The tabs gadget class provides a custom control that has imagry
  22.         similar in style to the tabs seen in a drawer full of file folders.
  23.         The action of the gadget is the same as a conventional
  24.         mutual-exclusion control in that only one tab can be active at a
  25.         time and a tab is selected by clicking upon it.
  26.  
  27.         The purpose of the tabs gadget class is to provide functionality like
  28.         the page selection cycle gadget on the top-right side of the AmigaOS
  29.         2.1 PrinterPS preferences editor, but allowing all the choices to be
  30.         visible at the same time. The tab "bar" allows strumming across the
  31.         selections. The current selection is slightly raised and its text
  32.         label displayed in bold.
  33.  
  34.     METHODS
  35.         OM_NEW -- Create the button gadget.  Passed to superclass, then OM_SET.
  36.  
  37.         OM_GET -- Get an object attribute.  Passed to superclass for unknown
  38.             attributes.
  39.  
  40.         OM_SET -- Set object attributes.  Passed to superclass first.
  41.  
  42.         OM_UPDATE -- Set object notification attributes.  Passed to superclass
  43.             first.
  44.  
  45.         OM_NOTIFY -- Sets  taglist for notification and pass to superclass.
  46.  
  47.         GM_DOMAIN -- Calculate imagery & positioning, and return
  48.             minimum/maximum domain size.
  49.  
  50.         GM_RENDER -- Renders the gadget imagry.  Overrides the superclass.
  51.  
  52.         GM_HITTEST -- Determines if mouse is within the gadget rectangle.
  53.             Overrides the superclass.
  54.  
  55.         GM_GOACTIVE -- Handles activation, toggle-select and button-select.
  56.             Overrides the superclass.
  57.  
  58.         GM_GOINACTIVE -- Deactivates object.  Overrides the superclass.
  59.  
  60.         GM_HANDLEINPUT -- Handles selection input, RMB undo/abort, etc.
  61.  
  62.         GM_KEYACTIVE -- Activates gadget via keyboard, selects appropriate
  63.             tab based on input key.  Invoked by window.class only.
  64.  
  65.         GM_KEYINACTIVE -- Deactivates gadget.  Invoked by window.class only.
  66.  
  67.         All other methods are passed to the superclass, including OM_DISPOSE.
  68.  
  69.     ATTRIBUTES
  70.  
  71.         GA_ID (WORD)
  72.             Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_NOTIFY)
  73.  
  74.         GA_Top (LONG) 
  75.             The top of the gadget.  Typically win->BorderTop + 2 for proper
  76.             placement along the inner top of a window unless used within a
  77.             layout gadget group, then placement is automatic.
  78.  
  79.         GA_Left (LONG)
  80.             The left edge of the gadget.
  81.  
  82.         GA_Height (LONG)
  83.             Height of the gadget.  Typically font height plus eight.
  84.  
  85.         GA_RelHeight (LONG)
  86.             Like all other ReAction gadgets, this attribute is supported.
  87.             However, due to the nature of the classes intended visuals
  88.             it is stylistically a bad thing to do.
  89.  
  90.         GA_Disabled (BOOL) -- Determines whether the gadget is disabled or
  91.             not.  Changing disable state will invoke GM_RENDER.  A disabled
  92.             gadget's border and label are all rendered in SHADOWPEN and then
  93.             dusted in a ghosting pattern that is rendered in SHADOWPEN.
  94.  
  95.             Defaults to FALSE.
  96.  
  97.         GA_TextAttr (struct TextAttr *)
  98.             Optional text attribute for the font to use for the labels.
  99.  
  100.             Defaults to NULL.
  101.  
  102.         CLICKTAB_Labels (struct List *)
  103.             A list of clicktab node structures used to indicate the labels
  104.             for each of the tabs.
  105.  
  106.             Defaults to NULL.
  107.  
  108.             Applicability is (OM_NEW)
  109.  
  110.         CLICKTAB_Current (LONG)
  111.             Currently selected tab.
  112.  
  113.             Defaults to 0.
  114.  
  115.             Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_NOTIFY)
  116.  
  117.     NOTES
  118.  
  119.         This class is best suited for use in a ReAction layout group
  120.         and requires receiving GM_DOMAIN prior to the first GM_RENDER
  121.         in order to size & position its imagery correctly.
  122. clicktab_gc/CLICKTAB_GetClass                       clicktab_gc/CLICKTAB_GetClass
  123.  
  124.     NAME
  125.         CLICKTAB_GetClass  --  Gets the pointer to the clicktab class.
  126.  
  127.     SYNOPSIS
  128.         clicktab_class = CLICKTAB_GetClass();
  129.         D0
  130.  
  131.         Class * CLICKTAB_GetClass(VOID);
  132.  
  133.     FUNCTION
  134.         Obtains the pointer to the ClickTab gadget class for use with
  135.         NewObject().  This function always returns a valid pointer so
  136.         you do not need to check it.  The reason is that if the library
  137.         opens fine, then the pointer returned is already setup.  (Of course
  138.         this implies that if opening the library fails, you shouldn't be
  139.         calling this.)
  140.  
  141.         Note that this function does not create the class, that is done
  142.         when the class library is opened.
  143.  
  144.     INPUTS
  145.         Nothing.
  146.  
  147.     RESULT
  148.         clicktab_class - Pointer to the ClickTab gadget class.
  149.  
  150.     SEE ALSO
  151. clicktab_gc/AllocClickTabNodeA               clicktab_gc/AllocClickTabNodeA
  152.  
  153.     NAME
  154.         AllocClickTabNodeA -- Allocate a ClickTab node.
  155.  
  156.     SYNOPSIS
  157.         struct Node * AllocClickTabNode(Tag, ...)
  158.         node = AllocClickTabNode(Tag, ...)
  159.  
  160.         struct Node * AllocClickTabNodeA(struct TagItem *)
  161.         node = AllocClickTabNodeA(taglist)
  162.  
  163.     FUNCTION
  164.         Allocates a node that can be added to the Exec linked list of
  165.         labels in the clicktab.  This is the only way to allocate a
  166.         node for this list, you cannot allocate nodes yourself because
  167.         the ClickTab class uses a private node structure.
  168.  
  169.     INPUTS
  170.         columns - How many columns your ClickTab has.
  171.         taglist - Attributes for the node, passed onto SetClickTabNodeAttrsA().
  172.  
  173.     RESULT
  174.         node - A node that can be added into the Exec list of labels for
  175.             a ClickTab gadget.
  176.  
  177.     SEE ALSO
  178.         FreeClickTabNode(), SetClickTabNodeAttrsA()
  179. clicktab_gc/FreeClickTabNode                   clicktab_gc/FreeClickTabNode
  180.  
  181.     NAME
  182.         FreeClickTabNode -- Free a ClickTab node.
  183.  
  184.     SYNOPSIS
  185.         VOID FreeClickTabNode(struct Node *)
  186.         FreeClickTabNode(node)
  187.  
  188.     FUNCTION
  189.         Frees a ClickTabNode allocated with AllocClickTabNodeA().
  190.  
  191.     INPUTS
  192.         node - The node to free.
  193.  
  194.     SEE ALSO
  195.         AllocClickTabNodeA()
  196. clicktab_gc/GetClickTabNodeAttrsA         clicktab_gc/GetClickTabNodeAttrsA
  197.  
  198.     NAME
  199.         GetClickTabNodeAttrsA -- Get attributes about a ClickTab node.
  200.  
  201.     SYNOPSIS
  202.         VOID GetClickTabNodeAttrs(struct Node *, Tag, ...)
  203.         GetClickTabNodeAttrs(node, firsttag, ...)
  204.  
  205.         VOID GetClickTabNodeAttrsA(struct Node *, struct TagItem *)
  206.         GetClickTabNodeAttrsA(node, taglist)
  207.  
  208.     FUNCTION
  209.         The ClickTab uses a private node structure and all attributes
  210.         are hidden, and must therefore be accessed with this function.
  211.  
  212.     INPUTS
  213.         node - The ClickTab node to get the information on.
  214.         taglist - A tag list of attributes to get.  ti_Tag is the attribute
  215.             to get and ti_Data is a pointer to a location to copy the result
  216.             to.  The exception is LBNA_Column, which is used to specify a
  217.             column to get attributes on.
  218.  
  219.     SEE ALSO
  220.         SetClickTabNodeAttrsA()
  221. clicktab_gc/SetClickTabNodeAttrsA         clicktab_gc/SetClickTabNodeAttrsA
  222.  
  223.     NAME
  224.         SetClickTabNodeAttrsA -- Set attributes of a ClickTab node.
  225.  
  226.     SYNOPSIS
  227.         VOID SetClickTabNodeAttrs(struct Node *, Tag, ...)
  228.         SetClickTabNodeAttrs(node, firsttag, ...)
  229.  
  230.         VOID SetClickTabNodeAttrsA(struct Node *, struct TagItem *)
  231.         SetClickTabNodeAttrsA(node, taglist)
  232.  
  233.     FUNCTION
  234.         Changes attributes for a ClickTab node.  Since the ClickTab
  235.         class uses a private node structure, this is the only way to change
  236.         node attributes.
  237.  
  238.         You may NOT change node attributes when the node is in a list
  239.         attached to a ClickTab gadget.  You must first detach the list
  240.         with CLICKTAB_Labels, ~0 before you can change attributes, and
  241.         then re-attach the list, and re-render the gadget to reflect
  242.         any changes. This should include re-domaining the gadget.
  243.         If used in a layout group, turn off domain caching for the
  244.         clicktab object if you intend to dynamically alter the tabs
  245.         and refresh the layout group with RethinkLayout().
  246.  
  247.     TAGS
  248.         TNA_Text (STRPTR)
  249.  
  250.             Text string to appear as a line in the ClickTab menu node.
  251.  
  252.         TNA_Number (WORD)
  253.  
  254.             ID Number assigned to a ClickTab menu node
  255.  
  256.         TNA_TextPen (WORD) 
  257.  
  258.             Specifies pen number to use for the label.
  259.  
  260.             Defaults to pens[TEXTPEN].
  261.  
  262.     INPUTS
  263.         node - Node whose attributes you are changing.
  264.         taglist - Tag list of attributes to change.
  265.  
  266.     SEE ALSO
  267.         GetClickTabNodeAttrsA()
  268.